/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package assign2;

import java.beans.XMLEncoder;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *
 * @author martyastiadi
 */
public class Main{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
         Product prod = new Product();
        prod.setName("table");


        try{
            XMLEncoder dec = new XMLEncoder (new BufferedOutputStream(new FileOutputStream("Inventory.xml")));
            dec.writeObject(prod);
            dec.close();
        }
        catch(IOException e) {
            System.out.println ("Testing");
            System.exit(1);

        }
        Runnable listGUI = new ListGUI();
        Thread myThread = new Thread(listGUI);
        myThread.start();
        Runnable server = new Server();
        Thread serverThread = new Thread(server);
        serverThread.start();
        System.out.println("Testing");

    }

    }
      

